<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
class Professor{
    public $nome = "";
    public $cpf = "";
    public $email = "";
    public $mysqli = "";
    //public $cpf = "";
    //public $nome = "";
    
    function __construct($nome, $cpf, $email){
        $ds = DIRECTORY_SEPARATOR;
        include_once $path = $_SERVER['DOCUMENT_ROOT'] . $ds . "DivSoft" . $ds . "Basicas" . $ds . "database" . $ds . "DMysql.php";
        $this->mysqli = new DMysql();

           $this->nome = $nome;
           $this->cpf = $cpf;
           $this->email = $email;
        
    }

    function getNome(){
        return $this->nome;
    }

    function salvarNoBanco(){
        require_once $_SERVER['DOCUMENT_ROOT'] . '/DivSoft/Basicas/database/DMysql.php';
        $dm = new DMysql();
        return $dm->saveProfessor($this);
    }

    function getArray(){
        return array('nome'=>$this->nome,
                     'cpf'=>$this->cpf,
                     'email'=>$this->email);
    }
}
?>
